package me.flyray.bsin.infrastructure.utils;

import me.flyray.bsin.payment.common.AbstractRes;

/*
 * api响应结果构造器
 *
 */
public class ApiResBuilder {

  /** 构建自定义响应对象, 默认响应成功 */
  public static <T extends AbstractRes> T buildSuccess(Class<? extends AbstractRes> T) {

    try {
      T result = (T) T.newInstance();
      return result;

    } catch (Exception e) {
      return null;
    }
  }
}
